package com.sky.controller.admin;

import com.sky.dto.DeshAggrDTO;
import com.sky.result.Result;
import com.sky.service.IWorkService;
import com.sky.vo.BusinessDataVO;
import com.sky.vo.DishOverViewVO;
import com.sky.vo.OrderOverViewVO;
import com.sky.vo.SetmealOverViewVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @BelongsProject: sky-take-out
 * @Author: XieMingHui
 * @CreateTime: 2023-11-21  17:26
 * @Description: 工作台接口
 * @Version: 1.0
 */
@RestController
@RequestMapping("/admin/workspace")
public class WorkController {
    @Resource
    private IWorkService iWorkService;
    /**
     * 查询今日运营数据
     * @author: XieMingHui
     * @param: []
     * @return: com.sky.result.Result<java.lang.String>
     **/
    @GetMapping("/businessData")
    public Result<BusinessDataVO> businessData(){
        return iWorkService.businessData();
    }
    /**
     * 查询套餐总览
     * @author: XieMingHui
     * @param: []
     * @return: com.sky.result.Result<java.lang.String>
     **/
    @GetMapping("/overviewSetmeals")
    public Result<SetmealOverViewVO> overviewSetmeals(){
        return iWorkService.overviewSetmeals();
    }
    /**
     * 查询菜品总览
     * @author: XieMingHui
     * @param: []
     * @return: com.sky.result.Result<java.lang.String>
     **/
    @GetMapping("/overviewDishes")
    public Result<DishOverViewVO> overviewDishes(){
        return iWorkService.overviewDishes();
    }
    /**
     * 查询订单管理数据
     * @author: XieMingHui
     * @param: []
     * @return: com.sky.result.Result<java.lang.String>
     **/
    @GetMapping("overviewOrders")
    public Result<OrderOverViewVO> overviewOrders(){
        return iWorkService.overviewOrders();
    }
}
